﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="PR_ScoreSub.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_ScoreSub" %>
<%@ Register src="../Controls/EmployeeTypeCombo.ascx" tagname="EmployeeTypeCombo" tagprefix="uc1" %>
<%@ Register src="../Controls/MasterYear.ascx" tagname="MasterYear" tagprefix="uc2" %>
<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc3" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  
<script type="text/javascript">   
          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
//                 alert("กรอกได้แต่ตัวเลขครับ!")
                 return false;
	          }
             return true;
          }
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
          } 
      
</script>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="รายการโยกย้าย"
        width="1100px"
        Height="600px"        
        Modal="true"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


</telerik:RadWindowManager>
    
    <title>หลักเกณฑ์การประเมินระดับหน่วยงานย่อย</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280" valign = "top">
            </td>
            <td width="20" >
            
            
            </td>
            <td>
            <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
                         <asp:Panel ID="Panel779" runat="server" Width="700px" ScrollBars="Auto">                         
                            <table align = "center" width = "650px">
                                    <tr>
                                        <td > กรม :&nbsp;
                                            <asp:Label ID="lblDepName" runat="server"></asp:Label>
                                        </td>
                                        <td align = "right">สำนัก/กอง : </td>                                        
                                       <td>
                                       <telerik:RadComboBox 
                                            ID="cmbJobSite" 
                                            DataTextField = "Name"
                                            DataValueField = "Sequence"
                                            AllowCustomText="true" 
                                            runat="server" 
                                            Width="200px"
                                            Filter ="Contains"
                                            EmptyMessage="..เลือกสังกัดที่ประเมิน.."
                                            OnClientTextChange = "onTextChange">
                                        </telerik:RadComboBox>            
                                       </td>
                                    </tr>
                                </table>
                                
                
                        </asp:Panel>
                        
                                             </div>
                </div>
            
            </td>

         
          </tr>
  </table>
                   
              <table>
                  <tr>
                      <td>
                          <div class="moduleDivSlim1000">
                              <div class="moduleDivBottom1000">
                                  <asp:Panel ID="Panel22" runat="server" ScrollBars="Auto" Width="1000px">
                                      <table align="center" width="100%">
                                         
                                          <tr>
                                              <td align="right" style="width: 189px">
                                                  ประเภทบุคลากร :</td>
                                              <td style="width: 285px">
                                                  <uc1:EmployeeTypeCombo ID="cbEmployeeType" runat="server" />
                                              </td>
                                              <td class="style1">
                                                  <asp:Label ID="lblTypeYear" runat="server" Text="ปี พ.ศ. :"></asp:Label>
                                              </td>
                                              <td>
                                                <uc2:MasterYear ID="cbYear" runat="server" />
                                              </td>
                                          </tr>
                                          <tr>
                                              <td align="right" style="width: 189px">
                                                  <asp:Label ID="Label3" runat="server" Text="รอบการประเมิน :"></asp:Label>
                                              </td>
                                              <td style="width: 285px">
                                                  <asp:RadioButtonList ID="radPeriod" runat="server" RepeatDirection="Horizontal" 
                                                      Width="218px">
                                                      <asp:ListItem Selected="True" Value="1">ครั้งที่ 1</asp:ListItem>
                                                      <asp:ListItem Value="2">ครั้งที่ 2</asp:ListItem>
                                                  </asp:RadioButtonList>
                                              </td>
                                              <td class="style1">
                                                  &nbsp;</td>
                                              <td>
                                                  &nbsp;</td>
                                          </tr>
               
                                          <tr>
                                              <td align="right" style="width: 189px">
                                                  &nbsp;</td>
                                              <td style="width: 285px">
                                                  <asp:Button ID="cmdSearch" runat="server" onclick="cmdSearch_Click" 
                                                      Text="ค้นหา" Width="104px" />
                                              </td>
                                              <td class="style1">
                                                  &nbsp;</td>
                                              <td>
                                                  &nbsp;</td>
                                          </tr>
                                      </table>
                                  </asp:Panel>
                              </div>
                          </div>
                      </td>
                  </tr>
              </table>
        <table>
        <tr>
      
            <td colspan="3">
                <div class="moduleDivSlim1000">
                    <div class="moduleDivBottom1000">
                        <table align="center" width="980px">
                            <tr>
                                <td align="left" class="tableHeader">
                                    หลักเกณฑ์การประเมินระดับหน่วยงานย่อย</td>
                            </tr>
                        </table>
                        <table align="center" width="980px">
                            <tr>
                                <td>
                                    <asp:Panel ID="PanelGrid" runat="server" Height="350px" ScrollBars="Auto" 
                                        Width="960px">
                                        <telerik:RadGrid ID="RadGrid2" runat="server" 
                                            AllowAutomaticDeletes="True" 
                                            AllowFilteringByColumn="True" 
                                            AllowMultiRowEdit="True" 
                                            AllowMultiRowSelection="True" 
                                            AllowPaging="True" AllowSorting="True" 
                                            AutoGenerateColumns="False" EnableAJAX="True" 
                                            EnableAJAXLoadingTemplate="True" 
                                            GridLines="None" OnItemCommand="RadGrid2_ItemCommand" 
                                            Skin="Outlook" Width="950px">
                                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                                ClientDataKeyNames="sub_sco_level_seq" 
                                                CommandItemDisplay="Top" 
                                                DataKeyNames="sub_sco_level_seq" 
                                                InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                                <CommandItemTemplate>
                                                    <table width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                                                    CommandName="InitInsert" 
                                                                    Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>">
                                        <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border: 0px; vertical-align: middle;" /> เพิ่มหลักเกณฑ์การประเมิน</asp:LinkButton>
                                                                &nbsp;&nbsp;
                                                            </td>
                                                            <td align="right">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </CommandItemTemplate>
                                                <RowIndicatorColumn>
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                                <ExpandCollapseColumn Visible="True">
                                                </ExpandCollapseColumn>
                                                <Columns>
                                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                                        EditText="คลิกเพื่อแก้ไขข้อมูล">
                                                        <ItemStyle Width="15px" />
                                                    </telerik:GridEditCommandColumn>
                                                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                                                        ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                                        Text="คลิกเพื่อลบข้อมูล" UniqueName="column1">
                                                        <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                                        <ItemStyle HorizontalAlign="Center" Width="10px" />
                                                    </telerik:GridButtonColumn>
                                                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                        CurrentFilterFunction="Contains" DataField="sub_sco_level_name" FilterControlWidth="100%" 
                                                        HeaderText="ระดับผลการประเมินย่อย" ShowFilterIcon="false" UniqueName="No">
                                                        <ItemTemplate>
                                                            <%# Eval("sub_sco_level_name")%>
                                                           <%-- <%#Container.DataItem("sub_sco_level_name")%>--%>
                                                        </ItemTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                        CurrentFilterFunction="Contains" DataField="score" FilterControlWidth="100%" 
                                                        HeaderText="ช่วงคะแนน" ShowFilterIcon="false" UniqueName="cmd_name">
                                                        <ItemTemplate>
                                                            <%# Eval("sco_min") + " - " + Eval("sco_max")%>
                                                           <%-- <%#Container.DataItem("score")%>--%>
                                                        </ItemTemplate>
                                                        <ItemStyle Width="30%" />
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                        CurrentFilterFunction="Contains" DataField="score_level_name" 
                                                        FilterControlWidth="100%" HeaderText="ระดับผลการประเมินหลัก" 
                                                        ShowFilterIcon="false" UniqueName="approved_name">
                                                        <ItemTemplate>
                                                            <%# Eval("score_level_name")%>
                                                            <%--<%#Container.DataItem("score_level_name")%>--%>
                                                       </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                                                        CurrentFilterFunction="Contains" DataField="percen_promote" 
                                                        FilterControlWidth="100%" HeaderText="เลื่อนเงินเดือน (%)" 
                                                        ShowFilterIcon="false" UniqueName="approved_date">
                                                        <ItemTemplate>
                                                            <%# Eval("percen_promote")%>
                                                            <%--<%#Container.DataItem("percen_promote")%>--%>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                                <EditFormSettings EditFormType="WebUserControl" 
                                                    UserControlName="../UserControls/PR_ScoreSub.ascx">
                                                    <EditColumn UniqueName="EditCommandColumn1">
                                                    </EditColumn>
                                                </EditFormSettings>
                                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                            </MasterTableView>
                                            <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                                                EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                                            </ClientSettings>
                                        </telerik:RadGrid>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
     
</table>
</asp:panel>

</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
    <style type="text/css">
        .style1
        {
            width: 45px;
        }
    </style>
</asp:Content>

